!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[SlideShowContainer]",["react","reactDOM"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[SlideShowContainer]"]=t(require("react"),require("react-dom")):e["rb_wixui.thunderbolt[SlideShowContainer]"]=t(e.React,e.ReactDOM)}("undefined"!=typeof self?self:this,(function(e,t){return function(){var n={5329:function(t){"use strict";t.exports=e},95561:function(e){"use strict";e.exports=t},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const n=[];return e&&n.push(`${l}${e}`),t.forEach((e=>{e&&(n.push(`${l}${e}`),n.push(e))})),n.join(" ")};const u=()=>"function"==typeof window.IntersectionObserver;const d={left:"onSwipeLeft",right:"onSwipeRight",up:"onSwipeUp",down:"onSwipeDown"},p=e=>{if(e.touches&&e.touches.length){const t=e.touches[0];return{x:t.pageX,y:t.pageY}}},f={touched:!0,moved:!1,deltaCoords:{x:0,y:0}},h=(e,t,n)=>()=>{let r;const i=e=>{r={...f,numOfTouches:e.touches.length,startCoords:p(e),startTime:Date.now(),evObj:{...e}}},o=e=>{if(!r)return;const t=p(e);if(t){r.startCoords||(r.startCoords=t);const e=r.startCoords.x-t.x,n=r.startCoords.y-t.y;r.moved=!0,r.deltaCoords={x:e,y:n}}},s=()=>{if(r)if(r.endTime=Date.now(),"onTap"===e&&(e=>e.touched&&!e.moved&&1===e.numOfTouches)(r))t(r.evObj);else if((e=>e.moved&&1===e.numOfTouches&&e.endTime-e.startTime<500&&(Math.abs(e.deltaCoords.x)>100||Math.abs(e.deltaCoords.y)>60))(r)){const n=((e,t)=>{let n;return n=Math.abs(e)>Math.abs(t)?e>0?"left":"right":t>0?"up":"down",n})(r.deltaCoords.x,r.deltaCoords.y);e===d[n]&&t(r.evObj)}};return n&&n.current&&(n.current.addEventListener("touchstart",i,{passive:!0}),n.current.addEventListener("touchmove",o,{passive:!0}),n.current.addEventListener("touchend",s,{passive:!0})),()=>{n&&n.current&&(n.current.removeEventListener("touchstart",i),n.current.removeEventListener("touchmove",o),n.current.removeEventListener("touchend",s))}},v=(e,t,n)=>s.useEffect(h(e,t,n),[e,n,t]),m="Slideshow",x="Next",E="Previous",g="Slides",b="slidesWrapper",S="nextButton",y="prevButton",C="shadowLayer",w="NoTransition";var O={root:"slideshow"};var N,k={root:"multi-state-box"},A={thinArrowsSkin:"JMUd8Z","slide-show-container":"mDzRgi",slideShowContainer:"mDzRgi",thinArrowsLargeSelectedCircleSkin:"QodGTM","nav-btn":"XvQ3FE",navBtn:"XvQ3FE","prev-btn":"CdshHv",prevBtn:"CdshHv","next-btn":"Qinjwp",nextBtn:"Qinjwp",slides:"hDJzl4","in-transition":"tAoGqR",inTransition:"tAoGqR","slides-dynamic-height":"T23gn7",slidesDynamicHeight:"T23gn7",shadowLayer:"N2NGoO","dots-nav-section":"lZ5yqT",dotsNavSection:"lZ5yqT","dots-nav-list":"dZxZOk",dotsNavList:"dZxZOk","nav-dot":"ZVUGJp",navDot:"ZVUGJp",selected:"Ale4Rm",longArrowsLargeSelectedCircleSkin:"ENJ6Ca",squareButtonsSkin:"ghJlnq",StateBoxSkin:"XVHXq_",stateBoxSkin:"XVHXq_"};function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;tnull};var I=e=>{let{skin:t,direction:n,moveToNextSlide:i,moveToPrevSlide:o,translations:a}=e;const l=B[t],c=s.createElement("button",{"data-testid":y,"aria-label":a.prevButtonAriaLabel||E,onClick:o,className:r(A.navBtn,A.prevBtn)},s.createElement(l,null)),u=s.createElement("button",{"data-testid":S,"aria-label":a.nextButtonAriaLabel||x,onClick:i,className:r(A.navBtn,A.nextBtn)},s.createElement(l,null)),d="rtl"===n;return s.createElement(s.Fragment,null,d?[u,c]:[c,u])};var V=e=>{let{translations:t,currentSlideIndex:n,slidesProps:i,isPlaying:o,focusSlideShow:a,changeSlide:l}=e;return s.createElement("nav",{"aria-label":t.navDotsAriaLabel||g,className:A.dotsNavSection},s.createElement("ol",{className:A.dotsNavList},i.map(((e,t)=>((e,t)=>s.createElement("li",{key:e.id,"aria-current":t===n?"true":void 0},s.createElement("a",{href:"./#"+e.id,"aria-label":e.title,onClick:e=>{e.preventDefault(),e.stopPropagation(),t!==n&&l(t),o||a()},className:r(A.navDot,{[A.selected]:t===n})})))(e,t)))))};function H(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{reverse:n,...r}=e;return s.createElement(de,t()({},r,{classNames:{enter:pe,enterActive:fe,exit:he,exitActive:ve}}),e.children)},OutIn:e=>{const{reverse:n,...r}=e;return s.createElement(de,t()({},r,{classNames:{enter:me,enterActive:xe,exit:Ee,exitActive:ge}}),e.children)},SlideHorizontal:e=>{const{reverse:n,...r}=e;return s.createElement(de,t()({},r,{classNames:n?{enter:we,enterActive:Oe,exit:Ne,exitActive:ke}:{enter:be,enterActive:Se,exit:ye,exitActive:Ce}}),e.children)},SlideVertical:e=>{const{reverse:n,...r}=e;return s.createElement(de,t()({},r,{classNames:n?{enter:Me,enterActive:je,exit:De,exitActive:Re}:{enter:Ae,enterActive:Le,exit:Pe,exitActive:Te}}),e.children)}};var Ie=e=>{const t=Be[e.type],{type:n,...r}=e;return s.createElement(t,r)};const Ve=(e,t)=>{let{isPlaying:n,isSlideShowInViewport:i,reverse:o,transition:a,transitionDuration:l,currentSlideIndex:c,onSlideEntered:u,onSlideExited:d,children:p,dynamicHeight:f,inTransition:h}=e;const v=!i||n&&i?"off":"polite",m="SlideVertical"===a||"SlideHorizontal"===a;return"NoTransition"===a?s.createElement("div",{ref:t,"data-testid":b,className:r(A.slides,f?A.slidesDynamicHeight:void 0),"aria-live":v},p):s.createElement("div",{ref:t,"data-testid":b,"aria-live":v,className:r(A.slides,f?A.slidesDynamicHeight:void 0,h&&m?A.inTransition:void 0)},s.createElement($,{component:null,childFactory:e=>s.cloneElement(e,{reverse:o})},s.createElement(Ie,{type:a,key:c,timeout:l,onEntered:u,onExited:d,unmountOnExit:!0},p)))};var He=s.forwardRef(Ve);const _e=(e,n)=>{const{id:i,className:o,customClassNames:a=[],skin:l,hasShadowLayer:d,translations:p,currentSlideIndex:f,slidesProps:h,showNavigationDots:x,showNavigationButton:E,autoPlay:g,shouldChangeSlidesOnSwipe:b=!0,autoPlayInterval:S,pauseAutoPlayOnMouseOver:y,transition:N,transitionDuration:L,transitionReverse:P,direction:T,changeSlide:M,reducedMotion:j,children:D,onCurrentSlideChanged:R,onChange:B,onMouseEnter:H,onMouseLeave:_,onClick:q,onDblClick:F,play:z,onPlay:U,pause:X,onPause:Z,isPlaying:G=g&&s.Children.toArray(D()).length>1&&!j,dynamicSlidesHeight:J=!1,observeChildListChange:$}=e,[Q,W]=s.useState(!1),[Y,K]=s.useState(!1),ee=s.useRef(null),te=!j&&N!==w,ne=s.useMemo((()=>P?!Q:Q),[Q,P]),re=s.Children.toArray(D()),ie=g&&re.length>1&&!j,oe=s.useRef(null),se=s.useCallback((e=>{let{slideIndex:t,isBackward:n,callback:r}=e;if(Y||t===f)"function"==typeof r&&r();else{if(te&&"function"==typeof r&&(oe.current=r),te){K(!0);W(!!(void 0===n?t{X(),null==H||H(e)}:H,ue=ie&&y?e=>{z(),null==_||_(e)}:_,de=ie?{onFocus:()=>X(),onBlur:()=>z()}:{},pe=s.useRef(null),fe=function(e,t){void 0===t&&(t=!1);const[n,r]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{if(!u())return r(t),()=>{};const n=e.current;if(n&&u()){const e=new window.IntersectionObserver((e=>{const t=e[e.length-1];r(t.isIntersecting)}));return e.observe(n),()=>{e.disconnect()}}return()=>{}}),[e,t]),n}(pe);v("onSwipeLeft",(()=>b&&ae()),pe),v("onSwipeRight",(()=>b&&le()),pe),function(e,t){const n=(0,s.useRef)((()=>{}));(0,s.useEffect)((()=>{n.current=e}),[e]),(0,s.useEffect)((()=>{if(null!==t){const e=setInterval((function(){n.current()}),t);return()=>clearInterval(e)}return()=>{}}),[t])}(ae,G&&fe?S:null);const he=s.useCallback((()=>({height:{[i]:()=>{const e=document.getElementById(i);return e?e.clientHeight:0}}})),[i]);s.useImperativeHandle(n,(()=>({play:()=>{z(),null==U||U({type:"autoplayOn"})},pause:()=>{X(),null==Z||Z({type:"autoplayOff"})},moveToSlide:se,next:ae,previous:le,getCustomMeasures:he})),[ae,le,se,he,Z,U,X,z]);const ve="StateBoxSkin"===l?k.root:O.root;return s.useEffect((()=>{$&&null!=ee&&ee.current&&$(i,ee.current)}),[]),s.createElement("div",t()({id:i},(e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{}))(e),{ref:pe,className:r(o,A.slideShowContainer,A[l],"ignore-focus",c(ve,...a)),role:"region",tabIndex:-1,"aria-label":p.slideShowAriaLabel||m,onClick:q,onDoubleClick:F,onMouseEnter:ce,onMouseLeave:ue},de),E&&s.createElement(I,{direction:T,skin:l,translations:p,moveToNextSlide:ae,moveToPrevSlide:le}),d&&s.createElement("div",{"data-testid":C,className:A.shadowLayer}),s.createElement(He,{ref:ee,isPlaying:G,isSlideShowInViewport:fe,reverse:ne,transition:j?w:N,transitionDuration:L,currentSlideIndex:f,inTransition:Y,onSlideEntered:()=>{te&&K(!1)},onSlideExited:()=>{null==R||R(f),oe.current&&(oe.current(),oe.current=null)},dynamicHeight:J},re[f]),x&&s.createElement(V,{focusSlideShow:()=>{var e;return null==(e=pe.current)?void 0:e.focus()},translations:p,slidesProps:h,currentSlideIndex:f,changeSlide:e=>{se({slideIndex:e})}}))};const qe=e=>e.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`));var Fe;const ze={SlideShowContainer:{component:s.forwardRef(_e),controller:(Fe=e=>{let{mapperProps:t,controllerUtils:n,stateValues:r}=e;const{updateProps:i}=n,{reducedMotion:o}=r;return{...t,reducedMotion:o,changeSlide:e=>{i({currentSlideIndex:e})},play:()=>{i({isPlaying:!0})},pause:()=>{i({isPlaying:!1})},observeChildListChange:t.isMasterPage?r.observeChildListChangeMaster:r.observeChildListChange}},{useComponentProps:(e,t,n)=>{const r=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,[t,n])=>{return{...e,[(r=t,r.startsWith("--")?t:qe(t))]:void 0===n?null:n};var r}),{});e.updateStyles(n)}}))(n);return Fe({mapperProps:e,stateValues:t,controllerUtils:r})}})}}}(),o}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[SlideShowContainer].b2bfa578.bundle.min.js.map